<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">

        <ui:define name="titulo">
            <h:outputText value="#{bundle.ListPD_OperarioTitle}"></h:outputText>
        </ui:define>

        <ui:define name="panelPrincipal">
        <h:form id="formulario" prependId="false">
            <h:panelGroup id="messagePanel" layout="block">
                <p:messages showDetail="true" />
            </h:panelGroup>

            <h:outputText escape="false" value="#{bundle.ListPD_OperarioEmpty}" rendered="#{pD_OperarioController.items.rowCount == 0}"/>

            <h:panelGroup rendered="#{pD_OperarioController.items.rowCount > 0}">
                <h:outputText value="#{pD_OperarioController.pagination.pageFirstItem + 1}..#{pD_OperarioController.pagination.pageLastItem + 1}/#{pD_OperarioController.pagination.itemsCount}"/>&nbsp;
                <h:commandLink action="#{pD_OperarioController.previous}" value="#{bundle.Previous} #{pD_OperarioController.pagination.pageSize}" rendered="#{pD_OperarioController.pagination.hasPreviousPage}"/>&nbsp;
                <h:commandLink action="#{pD_OperarioController.next}" value="#{bundle.Next} #{pD_OperarioController.pagination.pageSize}" rendered="#{pD_OperarioController.pagination.hasNextPage}"/>&nbsp;

                    <p:dataTable value="#{pD_OperarioController.items}" var="item" >

                    <p:column headerText="#{bundle.ListPD_OperarioTitle_codigo}">

                        <h:outputText value="#{item.codigo}"/>

                    </p:column>
                    <p:column headerText="#{bundle.ListPD_OperarioTitle_nombre}">

                        <h:outputText value="#{item.nombre}"/>

                    </p:column>
                    <p:column headerText="#{bundle.ListPD_OperarioTitle_auditoria}">

                        <h:outputText value="#{item.auditoria}"/>

                    </p:column>
                    <p:column headerText="&nbsp;">
                        
                        <h:commandLink action="#{pD_OperarioController.prepareView}" value="#{bundle.ListPD_OperarioViewLink}"/>
                        <h:outputText value=" "/>
                        <h:commandLink action="#{pD_OperarioController.prepareEdit}" value="#{bundle.ListPD_OperarioEditLink}"/>
                        <h:outputText value=" "/>
                        <h:commandLink action="#{pD_OperarioController.destroy}" value="#{bundle.ListPD_OperarioDestroyLink}"/>
                    </p:column>
                </p:dataTable>
            </h:panelGroup>
            <br />
            <h:commandLink action="#{pD_OperarioController.prepareCreate}" value="#{bundle.ListPD_OperarioCreateLink}"/>
            <br />
            <br />
            <h:commandLink value="#{bundle.ListPD_OperarioIndexLink}" action="/index" immediate="true" />
        </h:form>
     </ui:define>
  </ui:composition>

</html>